Learn R Programming

LFDR.MLE (version 1.0.1)

lfdr.lho, lfdr.l1o: Leave-one-out (L1O) and leave-half-out (LHO) method for LFDR estimation.

Description

Estimate the local false discovery rate using the leave-one-out method (L1O) or the leave-half-out method (LHO).

Usage

lfdr.l1o(x, dFUN = dabsTd, lower.ncp = 0.001, upper.ncp = 20, lower.p0 = 0,
      upper.p0 = 1, fixed.p0 = NULL, fixed.ncp = NULL, d0 = 0, ...)

lfdr.lho(x, dFUN = dabsTd, lower.ncp = 0.001, upper.ncp = 20, lower.p0 = 0, upper.p0 = 1, fixed.p0 = NULL, fixed.ncp = NULL, d0 = 0, ...)

lfdr.lo(x, dFUN = dabsTd, lower.ncp = 0.001, upper.ncp = 20, lower.p0 = 0, upper.p0 = 1, fixed.p0 = NULL, fixed.ncp = NULL, v = 0, d0 = 0, ...)

Arguments

x

Input numeric vector of statistics.

dFUN

Density function; default dabsTd (from absolute value of the Student t distribution)

lower.ncp

The lowerbound of the location parameter of dFUN (noncentrality parameter for default dFUN=dabsTd); default value is 0.001

upper.ncp

The upperbound of the location parameter of dFUN (noncentrality parameter for default dFUN=dabsTd); default value is 20

lower.p0

The lowerbound of p0 (proportion of unaffected features (null hypothesis)); default value is 0

upper.p0

The upperbound of p0 (proportion of unaffected features (null hypothesis)); default value is 1

fixed.p0

A fixed value of p0 (proportion of unaffected features (null hypothesis)); default value is NULL

fixed.ncp

A fixed value of the location parameter of dFUN (noncentrality parameter for default dFUN=dabsTd); default value is NULL

v

v in [0,1], portion of one feature that is considered in turn to estimate the LFDR; default value is v=0 (for lfdr.l1o (L1O)) and v=1/2 (for lfdr.lho (LHO)). For other values of v, use lfdr.lo.

d0

the numeric value of the null hypothesis for dFUN, default value is 0.

Other parameters to pass to dFUN (see notes and examples).

Value

A list with:

LFDR.hat

estimates of the LFDR

p0.hat

estimate of the proportion of unaffected features p0 (true null hypothesis).

ncp.hat

estimate of the location parameter of the distribution dFUN (ncp: noncentrality parameter of dFUN=dabsTd by default).

info

method name and information about computation failure.

References

Padilla, M., & Bickel, D. R. (2012). Estimators of the local false discovery rate designed for small numbers of tests. Statistical Applications in Genetics and Molecular Biology, 11(5), art. 4.

See Also

lfdr.mle, lfdr.mdl.

Examples

Run this code
# NOT RUN {
dfx <- 4;n.alt <- 1;n.null <- 4;true.ncp <- 7
#numeric imput data: statistics of the data with missing values (removed internally)
#(result of a absolute t.test statistics on the data)
W<-abs(c(rt(n=n.alt,ncp=true.ncp,df=dfx),rt(n=n.null,ncp=0,df=dfx)))
W[3]<-NA

z1<-lfdr.l1o(x=W,df=dfx)
z2<-lfdr.lho(x=W,df=dfx,fixed.ncp=10)
z3<-lfdr.lo(x=W,df=dfx,v=1/3,fixed.p0=0.3)
# }

Run the code above in your browser using DataLab